from pydantic import BaseModel
from forward.extend.pydantic.base import BaseSchema
from forward.model.schemas.lucky.draw import DrawSchema
from forward.utils.tools import ToolsUtil


class DrawAddInSchema(DrawSchema):
    pass


class DrawEditInSchema(DrawSchema):
    id: int


class DrawListInSchema(BaseSchema):
    title: str | None = None
    status: int | None = None
    page_num: int = 1
    page_size: int = 20
    model_config = {
        "alias_generator": ToolsUtil.to_lower_camel,
        "populate_by_name": True,
    }


class DrawDetailInSchema(BaseModel):
    id: int


class DrawDeleteInSchema(BaseModel):
    id: int


class GenerateInSchema(BaseModel):
    count: int


class DrawStatusInSchema(BaseModel):
    id: int
    status: int
